package com.example.userservice;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;


/**
 * @EnableFeignClients 开启feignClientS的服务
 * @EnableHystrix 开启hystrix的服务
 * @EnableHystrixDashboard 开启使用Hystrix dashboard 监控熔断器状态
 * */
@SpringBootApplication
@EnableFeignClients
public class FeignClientApplication {
    public enum Code {
        NONE(0), SILVER(5), GOLD(10), PLATINUM(15), DIAMOND(20);

        private final int percentage;

        //第一个占位给个名
        Code(int percentage) {
            this.percentage = percentage;
            //todo 将来也可以 one  two 这样
        }
    }
//    public static void main(String[] args) {
//        log.info("mycodes6:{}",Code.PLATINUM.percentage);
//        SpringApplication.run(FeignClientApplication.class, args);
//    }

}
